import {
    INCREAMENTCOUNT,
    DECREAMENTCOUNT

} from "../contants/countConst"
import store from "../store"

//累加的action
export const increamentAction = (data) => {
    return {
        type: INCREAMENTCOUNT,
        data
    }
}

export const decreamentAction = (data) => {
    return {
        type: DECREAMENTCOUNT,
        data
    }
}
//异步action
export const waitcreamentAction = (data) => {
    return () => {
        setTimeout(() => {
            store.dispatch({
                type: INCREAMENTCOUNT,
                data
            })

        }, 1000);

    }
}